import request from '@/router/axios';

export const Login = (username, password) => {
  return request({
    url: '/user/web/login',
    method: 'post',
    data: {
        username,
        password}
  }).catch(error=>{
    return Promise.reject(new Error(error))
  })
}

export const Register = (params) => {
    return request({
      url: '/user/web/register',
      method: 'post',
      data:params
    }).catch(error=>{
        return Promise.reject(new Error(error))
      })
  }